home > .cgi > Bughunting

 

.home
.news
.sites
.free downloads
.tips & tricks
.web builder
.cgi
.intro to Perl
.your own server
.add a chatroom
.uploading CGI
.bughunting
.using PWS
.smart ass
.resources
.in-depth articles
.magazine
.forums
.contacts
.site map
.IE5 companion
.cgi
Need to supercharge your Web site? Got a database of products, and no way to get them online. You need to harness the power of CGI programming. Using languages such as Perl, ASP and PHP, you can create interactive, intelligent sites. This is part one of the series that appeared in .net magazine. Subscribe now so you don't any of the upcoming articles!
 

Debugging Perl

Broken your script? Try some of these tricks to find out what's wrong

 

Click to view full size

One

The error logs your server generates may contain some useful information. In Xitami, you'll find them in C:\Xitami\cgierr.log. Open it in a text editor and you should get some idea where the problem lies

Two

Your host may give you access to their logs, too. The dreaded 500 server error almost always comes from either the file permissions being set wrong or not uploading your script in ASCII mode. Delete your script and upload it again.

Click to view full size

 

 

Click to view full size

Three

Test your script from the command line. Open an MS-DOS Prompt window type 'CD \Xitami\cgi-bin'. Then type 'perl -w' followed by the name of your script. You should see the all the HTML it would normally send to your browser spew across your screen.

Four

The '-w' switch turns warnings on. Not every warning is bad - if you see lines about 'uninitialized values', don't worry - they're not fatal. But look for the line numbers of anything more dire, then go back to the code and fix them.

Click to view full size

 


click here for print version of this story.






|.home|.news|.sites|.free downloads|.tips & tricks|.web builder|.in-depth articles|.magazine|.forums|.contacts|.sitemap|
Copyright Future Publishing 2001. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission from Future Publishing is prohibited. If you have any questions relating to the site, please contact the webmaster.
Click here for our Privacy statement.